package biz.ezcom.s2sh.service.impl;

import java.util.List;

import biz.ezcom.s2sh.dao.UserDao;
import biz.ezcom.s2sh.pojo.User;
import biz.ezcom.s2sh.service.UserService;

public class UserServiceImpl implements UserService{
	private UserDao userDao;
	
	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public void saveUser(User user) {
		userDao.saveUser(user);
	}

	@Override
	public List<User> findAllUsers() {
		return userDao.findAllUsers();
	}

	@Override
	public void delete(User user) {
		userDao.removeUser(user);
	}

	@Override
	public void updateUser(User user) {
		userDao.update(user);
	}

	@Override
	public User findUserById(int id) {
		return userDao.findUserById(id);
	}

}
